Function Reference

_FilePrint

Prints a plain text file.

#include <File.au3>
_FilePrint ( $s_File [, $i_Show] )

 

Parameters

$s_File The file to print.
$i_Show The state of the window. (default = @SW_HIDE)

 

Return Value

Success: Returns 1.
Failure: Returns 0 and sets @error according to the global constants list.

 

Remarks

Uses the ShellExecute function of shell32.dll.

 

Related

None.

 

Example


#include <File.au3>

$file = FileOpenDialog("Print File", "", "Text Documents (*.txt)", 1)
If @error Then Exit

$print = _FilePrint($file)
If $print Then
    MsgBox(0, "Print", "The file was printed.")
Else
    MsgBox(0, "Print", "Error: " & @error & @CRLF & "The file was not printed.")
EndIf